//
//  TabBarButton.m
//  AffectionBee
//
//  Created by 程建良 on 16/8/18.
//  Copyright © 2016年 chivalrous. All rights reserved.
//

#import "TabBarButton.h"
#define UISCREEWIDTH [UIScreen mainScreen].bounds.size.width
#define LIGHT_GRAY_COLOR [UIColor lightGrayColor]
#define kThemeColor [UIColor colorWithRed:255/255.0 green:209/255.0 blue:0 alpha:1]
@implementation TabBarButton
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.imageView.contentMode = UIViewContentModeCenter;
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self setTitleColor:LIGHT_GRAY_COLOR forState:UIControlStateNormal];
        [self setTitleColor:kThemeColor forState:UIControlStateSelected];
        self.titleLabel.font = [UIFont systemFontOfSize:12];
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.frame = CGRectMake(0, 4,UISCREEWIDTH/4 , 25);
    
    self.titleLabel.frame = CGRectMake(0, 30, UISCREEWIDTH/4, 19);

}
@end
